JBoss Community Archive (Read Only)

GateIn WCM

4.1 Templates editor

Templates view in WCM Editor shows main templates list.

Only Wcm managers users can manage templates:

images/author/download/attachments/74908631/wcm-4.1-1.png

Templates list is ordered by created/modified date showing more recent templates first.

Per tempalte item is shown attributes:

From Templates view manager user can perform following operations:

4.1.1 Creating a new template

From "New template" action we can access to a rich editor where we can write our template:

images/author/download/attachments/74908631/wcm-4.1.1-1.png

A template in GateIn WCM is a html document with some special tags called wcm tags.

Templates have a title and locale as metadata.

Like posts, template content is written in the rich editor:

images/author/download/attachments/74908631/wcm-4.1.1-2.png

Templates rich editor is similar as described in Writting Posts but it has a specific feature for listing special wcm tags:

images/author/download/attachments/74908631/wcm-4.1.1-3.png

The use and features of each wcm tag will be covered in next point 4.2.

4.1.2 Editing an existing template

From templates view we can edit an existing template accesing through template name link or edit link.

Edit template view is similar like "New template" view but it has a new functionality: version management.

images/author/download/attachments/74908631/wcm-4.1.2-1.png

Version selector allows to change from template version in the active editor.

images/author/download/attachments/74908631/wcm-2.1.2-1.png

Every time a template is saved, a new version is created in the repository.

4.1.3 Add categories to a template

Each template can have several categories attached.
Categories are defined in next line under template name.

For example, the following template:

images/author/download/attachments/74908631/wcm-4.1.3-1.png

has two categories "Concert" and "Events".

Each category has a link that is a shortcut for filter per category:

images/author/download/attachments/74908631/wcm-4.1.3-2.png

A new category can be added through Category link:

images/author/download/attachments/74908631/wcm-4.1.3-3.png

images/author/download/attachments/74908631/wcm-4.1.3-4.png

A category can be removed throught Remove icon images/author/download/attachments/74908631/wcm-2.1.3-5.png

4.1.4 Relationships

GateIn WCM allows to link templates using relationships in a similar way like posts.

A relationship has a key attribute that defines which is the template related for a given source template.

GateIn WCM uses relationship as soft links, both templates source and target are independents.

For example:

  • We have a Template A written in english (en).

  • We have a Template B written in spanish (es).

  • We want to define a relationship to say that Template B is related with Template A with key "es", in a logical expression, RelationShip(Templatae A, "es") = Template B.

Relationships can be used per WCM Content portlet to redirect automatically content given the current locale of user.

images/author/download/attachments/74908631/wcm-4.1.4-1.png

Relationships can be defined used the following dialog:

images/author/download/attachments/74908631/wcm-4.1.4-2.png

Relationships have one direction, in the example,<Example> has a relationship with <Example - es> with es key.

Bidirectional relationships have to be declared explicitly, in our example, we should create a new relation on <Example - es> linked with <Example> with en key.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 13:42:05 UTC, last content change 2014-01-27 17:49:16 UTC.